<template>

  <div id="list">
    我是list 组件 ------ {{this.$store.state.count}}
    <button @click="addCount">

      store 里面的数据++
    </button>
  </div>
</template>
<script>
  import store from '../vuex/store.js'
  export default {
    data() {
      return {
        msg: 'list'
      }
    },
    store,
    methods: {
      addCount() {
        this.$store.commit('incCount')
      }
    }
  }

</script>
